#ifndef WRITEVIDEO_H
#define WRITEVIDEO_H

#include <opencv2/opencv.hpp>
#include <list>
#include <QThread>
#include <QObject>
#include "datastruct.h"
#include "cvxtext.h"

using namespace cv;
using namespace std;

class WriteVideo : public QThread
{
    Q_OBJECT

public:
    WriteVideo();
    virtual ~WriteVideo();
     void setInfo(string path_open, string path_save,
                  list<SubtitleInfo> *l_subtitle1, list<BoxInfo> *l_box1);

protected:
    void run();

private:
    VideoWriter writer;
    VideoCapture capture;
    string path_open;
    string path_save;
    int width;
    int height;
    double speed;
    double count;
    list<SubtitleInfo> *l_subtitle;
    list<BoxInfo> *l_box;
    CvxText *cvtext;

signals:
    void resultReady(int value);
};

#endif // WRITEVIDEO_H
